﻿<%@ Page Language="C#" MasterPageFile="~/Site.master" Title="Real Estate By Last Name"
    AutoEventWireup="true" CodeBehind="ByLastName.aspx.cs" Inherits="RealEstate.ByLastName" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
    <script type="text/javascript">
        function RowSelected(sender, args) {
            alert("Selected: " + args.getDataKeyValue("TransactionId"));
        }
        function RowDblClick(sender, args) {
            window.location = "TranDetails.aspx?id=" + args.getDataKeyValue("TransactionId") + "&viewid=2";
        }
    </script>
    <telerik:RadScriptManager ID="RadScriptManager1" runat="server">
        <Scripts>
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.Core.js" />
            <asp:ScriptReference Assembly="Telerik.Web.UI" Name="Telerik.Web.UI.Common.jQuery.js" />
        </Scripts>
    </telerik:RadScriptManager>
    <telerik:RadAjaxManager ID="RadAjaxManager1" runat="server">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="RadGrid1">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="RadGrid1" />
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
    <telerik:RadSkinManager ID="RadSkinManager1" runat="server" Skin="Web20">
    </telerik:RadSkinManager>
    <div>
    </div>
    <telerik:RadAjaxPanel ID="RadAjaxPanel1" runat="server" LoadingPanelID="RadAjaxLoadingPanel1">
        <telerik:RadGrid ID="radTableTransaction" runat="server" PageSize="15" AllowSorting="False"
            AllowPaging="True" ShowGroupPanel="False" AutoGenerateColumns="False" GridLines="None" GroupingSettings-CaseSensitive="False" AllowFilteringByColumn="true">
            <PagerStyle Mode="NumericPages"></PagerStyle>
            <ClientSettings>
                <Selecting AllowRowSelect="True" />
                <ClientEvents OnRowDblClick="RowDblClick" />
            </ClientSettings>
            <MasterTableView Width="100%" ClientDataKeyNames="TransactionId" ShowGroupFooter="true"
                ShowFooter="True" GroupLoadMode="Client">
                <GroupByExpressions>
                    <telerik:GridGroupByExpression>
                        <SelectFields>
                            <telerik:GridGroupByField FieldName="ClientLastName" HeaderText="Last Name"
                                FormatString="<strong>{0}</strong>" />
                        </SelectFields>
                        <GroupByFields>
                            <telerik:GridGroupByField FieldName="ClientLastName" />
                        </GroupByFields>
                    </telerik:GridGroupByExpression>
                </GroupByExpressions>
                <Columns>
                    <telerik:GridTemplateColumn AllowFiltering="false" HeaderText=" ">
                        <ItemTemplate>
                            <%# Container.DataSetIndex + 1 %>
                        </ItemTemplate>
                    </telerik:GridTemplateColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"  SortExpression="Client.FullName" HeaderText="Full Name"
                        HeaderButtonType="TextButton" DataField="Client.FullName" UniqueName="FullName"
                        DataFormatString="{0}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" SortExpression="Case ID Number" HeaderText="Case Number"
                        HeaderButtonType="TextButton" DataField="CaseIDNumber" UniqueName="CaseIDNumber"
                        DataFormatString="{0}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" SortExpression="Client.CellNumber" HeaderText="Cell Phone"
                        HeaderButtonType="TextButton" DataField="Client.CellNumber" UniqueName="" DataFormatString="{0}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" SortExpression="CaseStatus" HeaderText="Transaction Status"
                        HeaderButtonType="TextButton" DataField="CaseStatus" UniqueName="CaseStatus"
                        DataFormatString="{0}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" SortExpression="DateOfStatus" HeaderText="Date Of Status"
                        HeaderButtonType="TextButton" DataField="DateOfStatus" UniqueName="DateOfStatus"
                        DataFormatString="{0:MM/dd/yyyy}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" SortExpression="LockedProgram" HeaderText="Locked Program"
                        HeaderButtonType="TextButton" DataField="LockedProgram" UniqueName="LockedProgram"
                        DataFormatString="{0}">
                    </telerik:GridBoundColumn>
                    <telerik:GridBoundColumn AutoPostBackOnFilter="true" CurrentFilterFunction="Contains" SortExpression="TargetProgram" HeaderText="TargetProgram"
                        HeaderButtonType="TextButton" DataField="Target Program" UniqueName="TargetProgram"
                        DataFormatString="{0}">
                    </telerik:GridBoundColumn>
                </Columns>
            </MasterTableView>
        </telerik:RadGrid>
    </telerik:RadAjaxPanel>
    <telerik:RadAjaxLoadingPanel ID="RadAjaxLoadingPanel1" runat="server" />
</asp:Content>
